<HTML>

<HEAD>
<TITLE>Compta</TITLE>
<META http-equiv="Content-Type" content="text/html;charset=utf-8" />

</HEAD>

<BODY>

<?php
   
   $db = pg_connect("host=localhost port=5432 dbname=cb102011 user=baradmin password=pgsqlB2D") or die('Connection DB failed');

$query = pg_query($db,"SELECT login,solde,promo FROM cb_users ORDER BY promo,login;");
$array = pg_fetch_all($query);


foreach($array as $i) {
  echo $i['promo'].";".$i['login'].";".$i['solde']."<br/>";
}

?>
	 
</BODY>
</HTML>
